package com.davinci.freemarket.businessLayer.controllers;

import com.davinci.freemarket.dataAccessLayer.accessdata.user.UserDAO;
import com.davinci.freemarket.dataModelLayer.model.UserModel;

public class RegisterController {
	
	public boolean addUser(UserModel user){
		boolean registerOk = false;
		UserDAO userDao = new UserDAO();
		if(user!=null){
			int userOk = userDao.addUser(user.getNick(), user.getPass(), user.getEmail(), user.getAddress(), user.getName(), user.getLastname(), user.getPhone());
			if(userOk == 1){
				registerOk = true;
			}
		}
		return registerOk;
	}
	
}